<% if @saved -%>
  remove_user_from_page();
  TracksPages.set_page_badge(<%= @total_users %>);
  TracksPages.page_inform('<%=  t('users.destroy_successful', :login => @deleted_user.login) %>');
<% else -%>
  TracksPages.page_error('<%=  t('users.destroy_error', :login => @deleted_user.login) %>');
<% end -%>

function remove_user_from_page() {
  TracksPages.slide_up_and_remove("#user-<%= @deleted_user.id%>");
}